// local to local tool

package com.smart.utils {

	import flash.display.DisplayObject;
	import flash.geom.Point;

	public class CoordUtils {
	
		// supply one location and point, translate to another 
		public static function localToLocal(containerFrom:DisplayObject, containerTo:DisplayObject, origin:Point=null):Point {
		
			// use 0,0 if not point is supplied
			var point:Point = origin ? origin : new Point();
			point = containerFrom.localToGlobal(point);
			point = containerTo.globalToLocal(point);
			return point;
			
		}
	}
}